home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '87 / Utilities ƒ / Text Editors ƒ / FastEddie2Ltd ƒ / FastUser.h < prev    next >
Text File  |  1986-08-13  |  5KB  |  177 lines

  1. /************************************************/
  2. /* FstEUser.h .. header file used by FastUser.c */
  3. /* the listed header files  must be on the same */
  4. /* disk as the compiler                         */
  5. /************************************************/
  6.  
  7. #include <string.h>
  8. #include <qd.h>
  9. #include <misc.h>
  10. #include <mem.h>
  11. #include <win.h>
  12. #include <qdvars.h>
  13. #include <control.h>
  14. #include <te.h>
  15. #include <event.h>
  16. #include <file.h>
  17. #include <seg.h>
  18. #include <pack.h>
  19. #include <menu.h>
  20. #include <dialog.h>
  21. #include <toolbox.h>
  22.  
  23. #define TRUE      1
  24. #define FALSE     0
  25.  
  26. #define OK        1
  27. #define ERR       0
  28.  
  29. #define NEXT      1
  30. #define PRVS      0
  31.  
  32. #define WORD      1
  33. #define STRING    0
  34.  
  35. #define MMC       1
  36. #define AZTEC     2
  37.  
  38. #define STR_LNGTH       256
  39. #define LINE_LNGTH      81
  40. #define MAX_FLS_PASSED  16
  41.  
  42. #define AUTOKEY   -1
  43. #define NONE      -1
  44. #define BREAK     -1
  45. #define NULL       0
  46. #define CRONLY    -1    /* (*te_hndl)->cronly == CRONLY if word wrap off */
  47.  
  48. #define NIL        0L
  49. #define SCROLL    -1L
  50. #define SCAN_CR   -1L   /* for index_wild .. scan till CR */
  51.  
  52. #define APPLE_MRK 0X14
  53. #define ENTER     0X03
  54. #define CR        0X0d  /* carriage return      */
  55. #define TAB       0X09 
  56. #define BKSP      0X08  /* backspace            */
  57. #define BULLET    0XA5
  58.  
  59. #define DOT_KEY   47
  60. #define COMMA_KEY 43
  61. #define ZERO_KEY  29
  62. #define ONE_KEY   18
  63. #define TWO_KEY   19
  64. #define THREE_KEY 20
  65. #define FOUR_KEY  21
  66. #define FIVE_KEY  23
  67. #define SIX_KEY   22
  68. #define SEVEN_KEY 26
  69. #define EIGHT_KEY 28
  70. #define NINE_KEY  25
  71. #define A_KEY      0
  72. #define B_KEY     11
  73. #define C_KEY      8
  74. #define D_KEY      2
  75. #define E_KEY     14
  76. #define F_KEY      3
  77. #define G_KEY      5
  78. #define H_KEY      4
  79. #define I_KEY     34
  80. #define J_KEY     38
  81. #define K_KEY     40
  82. #define L_KEY     37
  83. #define M_KEY     46
  84. #define N_KEY     45
  85. #define O_KEY     31
  86. #define P_KEY     35
  87. #define Q_KEY     12
  88. #define R_KEY     15
  89. #define S_KEY      1
  90. #define T_KEY     17
  91. #define U_KEY     32
  92. #define V_KEY      9
  93. #define W_KEY     13
  94. #define X_KEY      7
  95. #define Y_KEY     16
  96. #define Z_KEY      6
  97.  
  98. /************************************************************/
  99. /* menu headers and menu items .. FastUser() can access     */
  100. /* menus facilities with menu_choise (menu_head, menu_item) */
  101. /************************************************************/
  102. #define APPLE     1 
  103. #define   ABOUT         1
  104. #define   ABOUT_FILE    2 
  105. #define FILE      2 
  106. #define   NEW           1
  107. #define   OPEN          2
  108. #define   KLOSE         3 
  109. #define   DELETE        4 
  110. #define   SAVE          6
  111. #define   SAVE_TO       7
  112. #define   REVERT        9
  113. #define   QUIT         11
  114. #define   TRANSFER     12
  115. #define EDIT      3 
  116. #define   UNDO          1 
  117. #define   CUT           3 
  118. #define   COPY          4 
  119. #define   PASTE         5
  120. #define   CPY_PST_0     7
  121. #define   CPY_PST_1     8
  122. #define   CPY_PST_N     9
  123. #define   CPY_PST_9    10
  124. #define SEARCH    4 
  125. #define   FIND          1 
  126. #define   GLOSS         2
  127. #define   BALANCE       3 
  128. #define   LINE          4
  129. #define   IMPSBLS       5
  130. #define   COMPARE       6
  131. #define DISPLAY   5
  132. #define   MOVE          1
  133. #define   NEAT          2
  134. #define   REVERSE       3
  135. #define   JUSTIFY       4
  136. #define WINDOWS   6
  137. #define FONT      7
  138. #define SIZE      8
  139. #define OPTIONS   9
  140. #define   INSERT        1  
  141. #define   SYNC          2  
  142. #define   FIND_GLOBAL   4  
  143. #define   FIND_SENS     5  
  144. #define   WRAP          7
  145. #define   AUTO_IN       8
  146. #define   AUTO_GLOSS    9
  147. #define   OPEN_FULL    10
  148. #define   AUTO_SAVE    11
  149. #define   TAB_SET      12
  150. #define   SMART        13
  151. #define   SV_OPTIONS   15
  152.  
  153. #define K_MENUS 9
  154.  
  155. /************************************************************/
  156. /* each FastEddie window has an associated node with the    */
  157. /* following fields:                                        */
  158. /************************************************************/
  159. typedef struct win_node
  160.   { char                title [LINE_LNGTH],     /* file title                 */
  161.                         win_title [LINE_LNGTH]; /* window title               */
  162.     windowpeek          wpeek;                  /* unused                     */
  163.     windowptr           wp;                     /* window pointer             */
  164.     rect                *pr;                    /* the port rectangle         */
  165.     tehandle            te_hndl;                /* see IM TextEdit            */
  166.     controlhandle       scrl_hndl;              /* see IM Control Manager     */
  167.     int                 h_scrl,                 /* horizontal scroll position */
  168.                         strokes,                /* strokes since save         */
  169.                         vref,                   /* see IM File Manager        */
  170.                         slot,                   /* home position of window    */
  171.                         moved,                  /* if window moved from home  */ 
  172.                         left, top, right, bottom; /* original window position */
  173.     int                 part_nmbr, nmbr_parts;  /* of multiple part file      */
  174.     long                strt_pos, orig_lngth;   /* used by Revert             */
  175.     struct win_node     *nxt_node;              /* of multi part file */
  176.   };
  177.